using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Resources;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;

namespace KPIS.GERP.Models.HRM
{
    [Table("hrm_ps_emp_position_histories")]
    public class EmpPositionHistory
    {
        [Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)] [DataMember, Column("pos_his_seq", Order = 1), Display(Name = "PosHisId", ResourceType = typeof (Resources.PsEmpPositionHistoriesResource))] public int PosHisId { get; set; }

        [ForeignKey("Emp")] [DataMember, Column("emp_seq", Order = 2), Display(Name = "EmpId", ResourceType = typeof (Resources.PsEmpPositionHistoriesResource))] public Nullable<int> EmpId { get; set; }

        [DataMember, Column("start_date", Order = 3), Display(Name = "StartDate", ResourceType = typeof (Resources.PsEmpPositionHistoriesResource))] public Nullable<System.DateTime> StartDate { get; set; }

        [DataMember, Column("end_date", Order = 4), Display(Name = "EndDate", ResourceType = typeof (Resources.PsEmpPositionHistoriesResource))] public Nullable<System.DateTime> EndDate { get; set; }

        [ForeignKey("CmdDtls")] [DataMember, Column("cmd_dtls_seq", Order = 5), Display(Name = "CmdDtlsId", ResourceType = typeof (Resources.PsEmpPositionHistoriesResource))] public Nullable<int> CmdDtlsId { get; set; }

        [DataMember, Column("cmd_ref_no", Order = 6), Display(Name = "CmdRefNo", ResourceType = typeof (Resources.PsEmpPositionHistoriesResource))] public string CmdRefNo { get; set; }

        [DataMember, Column("cmd_date", Order = 7), Display(Name = "CmdDate", ResourceType = typeof (Resources.PsEmpPositionHistoriesResource))] public Nullable<System.DateTime> CmdDate { get; set; }

        [DataMember, Column("cmd_name", Order = 8), Display(Name = "CmdName", ResourceType = typeof (Resources.PsEmpPositionHistoriesResource))] public string CmdName { get; set; }

        [DataMember, Column("cmd_pos_ref", Order = 9), Display(Name = "CmdPosRef", ResourceType = typeof (Resources.PsEmpPositionHistoriesResource))] public string CmdPosRef { get; set; }

        [DataMember, Column("cmd_pos_name", Order = 10), Display(Name = "CmdPosName", ResourceType = typeof (Resources.PsEmpPositionHistoriesResource))] public string CmdPosName { get; set; }

        [ForeignKey("CmdClass")] [DataMember, Column("cmd_class_seq", Order = 11), Display(Name = "CmdClassId", ResourceType = typeof (Resources.PsEmpPositionHistoriesResource))] public Nullable<int> CmdClassId { get; set; }

        [DataMember, Column("cmd_class_name", Order = 12), Display(Name = "CmdClassName", ResourceType = typeof (Resources.PsEmpPositionHistoriesResource))] public string CmdClassName { get; set; }

        [ForeignKey("CmdJobSite")] [DataMember, Column("cmd_job_site_seq", Order = 13), Display(Name = "CmdJobSiteId", ResourceType = typeof (Resources.PsEmpPositionHistoriesResource))] public Nullable<int> CmdJobSiteId { get; set; }

        [DataMember, Column("cmd_job_site_name", Order = 14), Display(Name = "CmdJobSiteName", ResourceType = typeof (Resources.PsEmpPositionHistoriesResource))] public string CmdJobSiteName { get; set; }

        [DataMember, Column("cmd_working_job_site_name", Order = 15), Display(Name = "CmdWorkingJobSiteName", ResourceType = typeof (Resources.PsEmpPositionHistoriesResource))] public string CmdWorkingJobSiteName { get; set; }

        [DataMember, Column("cmd_dep_name", Order = 16), Display(Name = "CmdDepName", ResourceType = typeof (Resources.PsEmpPositionHistoriesResource))] public string CmdDepName { get; set; }

        [DataMember, Column("cmd_mis_name", Order = 17), Display(Name = "CmdMisName", ResourceType = typeof (Resources.PsEmpPositionHistoriesResource))] public string CmdMisName { get; set; }

        [ForeignKey("CmdField")] [DataMember, Column("cmd_field_seq", Order = 18), Display(Name = "CmdFieldId", ResourceType = typeof (Resources.PsEmpPositionHistoriesResource))] public Nullable<int> CmdFieldId { get; set; }

        [DataMember, Column("cmd_field_name", Order = 19), Display(Name = "CmdFieldName", ResourceType = typeof (Resources.PsEmpPositionHistoriesResource))] public string CmdFieldName { get; set; }

        [ForeignKey("CmdExec")] [DataMember, Column("cmd_exec_seq", Order = 20), Display(Name = "CmdExecId", ResourceType = typeof (Resources.PsEmpPositionHistoriesResource))] public Nullable<int> CmdExecId { get; set; }

        [DataMember, Column("cmd_exec_name", Order = 21), Display(Name = "CmdExecName", ResourceType = typeof (Resources.PsEmpPositionHistoriesResource))] public string CmdExecName { get; set; }

        [DataMember, Column("cmd_salary", Order = 22), Display(Name = "CmdSalary", ResourceType = typeof (Resources.PsEmpPositionHistoriesResource))] public Nullable<double> CmdSalary { get; set; }

        [DataMember, Column("cmd_salary_position", Order = 23), Display(Name = "CmdSalaryPosition", ResourceType = typeof (Resources.PsEmpPositionHistoriesResource))] public Nullable<double> CmdSalaryPosition { get; set; }

        [DataMember, Column("salary", Order = 24), Display(Name = "Salary", ResourceType = typeof (Resources.PsEmpPositionHistoriesResource))] public Nullable<double> Salary { get; set; }

        [DataMember, Column("pos_ref", Order =25), Display(Name = "PosRef", ResourceType = typeof (Resources.PsEmpPositionHistoriesResource))] public string PosRef { get; set; }

        [DataMember, Column("pos_name", Order = 26), Display(Name = "PosName", ResourceType = typeof (Resources.PsEmpPositionHistoriesResource))] public string PosName { get; set; }

        [ForeignKey("Class")] [DataMember, Column("class_seq", Order = 27), Display(Name = "ClassId", ResourceType = typeof (Resources.PsEmpPositionHistoriesResource))] public Nullable<int> ClassId { get; set; }

        [DataMember, Column("class_name", Order = 28), Display(Name = "ClassName", ResourceType = typeof (Resources.PsEmpPositionHistoriesResource))] public string ClassName { get; set; }

        [ForeignKey("JobSite")] [DataMember, Column("job_site_seq", Order = 29), Display(Name = "JobSiteId", ResourceType = typeof (Resources.PsEmpPositionHistoriesResource))] public Nullable<int> JobSiteId { get; set; }

        [DataMember, Column("job_site_name", Order = 30), Display(Name = "JobSiteName", ResourceType = typeof (Resources.PsEmpPositionHistoriesResource))] public string JobSiteName { get; set; }

        [ForeignKey("Move")] [DataMember, Column("move_seq", Order =31), Display(Name = "MoveId", ResourceType = typeof (Resources.PsEmpPositionHistoriesResource))] public Nullable<int> MoveId { get; set; }

        [DataMember, Column("remarks", Order = 32), Display(Name = "Remarks", ResourceType = typeof (Resources.PsEmpPositionHistoriesResource))] public string Remarks { get; set; }

        [DataMember, Column("record_status", Order =33), Display(Name = "RecordStatus", ResourceType = typeof (Resources.PsEmpPositionHistoriesResource))] public string RecordStatus { get; set; }

        [DataMember, Column("created_by", Order = 34), Display(Name = "CreatedBy", ResourceType = typeof (Resources.PsEmpPositionHistoriesResource))] public Nullable<int> CreatedBy { get; set; }

        [DataMember, Column("created_when", Order = 35), Display(Name = "CreatedWhen", ResourceType = typeof (Resources.PsEmpPositionHistoriesResource))] public Nullable<System.DateTime> CreatedWhen { get; set; }

        [DataMember, Column("updated_by", Order = 36), Display(Name = "UpdatedBy", ResourceType = typeof (Resources.PsEmpPositionHistoriesResource))] public Nullable<int> UpdatedBy { get; set; }

        [DataMember, Column("updated_when", Order = 37), Display(Name = "UpdatedWhen", ResourceType = typeof (Resources.PsEmpPositionHistoriesResource))] public Nullable<System.DateTime> UpdatedWhen { get; set; }

        [ForeignKey("CmdType")] [DataMember, Column("cmd_type_seq", Order = 38), Display(Name = "CmdTypeId", ResourceType = typeof (Resources.PsEmpPositionHistoriesResource))] public Nullable<int> CmdTypeId { get; set; }

        [DataMember, Column("his_type", Order = 39), Display(Name = "HisType", ResourceType = typeof (Resources.PsEmpPositionHistoriesResource))] public string HisType { get; set; }

        [DataMember, Column("working_job_site_name", Order = 40), Display(Name = "WorkingJobSiteName", ResourceType = typeof (Resources.PsEmpPositionHistoriesResource))] public string WorkingJobSiteName { get; set; }

        [DataMember, Column("department_name", Order =41), Display(Name = "DepartmentName", ResourceType = typeof (Resources.PsEmpPositionHistoriesResource))] public string DepartmentName { get; set; }

        [DataMember, Column("ministry_name", Order =42), Display(Name = "MinistryName", ResourceType = typeof (Resources.PsEmpPositionHistoriesResource))] public string MinistryName { get; set; }

        [DataMember, Column("field_name", Order = 43), Display(Name = "FieldName", ResourceType = typeof (Resources.PsEmpPositionHistoriesResource))] public string FieldName { get; set; }

        [DataMember, Column("exec_name", Order = 44), Display(Name = "ExecName", ResourceType = typeof (Resources.PsEmpPositionHistoriesResource))] public string ExecName { get; set; }

        public virtual Employee Emp { get; set; }

        public virtual HRM.PsCommandDtls CmdDtls { get; set; }

        public virtual HRM.MpClass CmdClass { get; set; }

        public virtual HRM.JobSite CmdJobSite { get; set; }

        public virtual HRM.FieldPosition CmdField { get; set; }

        public virtual PsCommand CmdExec { get; set; }

        public virtual MpClass Class { get; set; }

        public virtual HRM.JobSite JobSite { get; set; }

        public virtual HRM.EsMoveRequest Move { get; set; }

        public virtual HRM.PsCommandType CmdType { get; set; }

    }
}